<script setup>
const props=defineProps({
  placeholder: {
    type: String,
    default: "请输入",
  },
  title: {
    type: String,
  },
  modelValue:{
    type:String,
    require:true
  }
});
// const str=ref(props.modelValue)
const emits=defineEmits(["INputChange"])
const INputChange=(e)=>{
    // console.log(e.target.value);
        emits('INputChange',e.target.value)

}
</script>
<template>
  <div>
    <div class="_input">
      <div class="_input_icon"><slot name="icon"></slot></div>
      <div class="_input_main">
        <input type="text"  :placeholder="placeholder" @input="INputChange" />
        <div class="_input_text_button"><slot name="img"></slot></div>
      </div>
    </div>
  </div>
</template>
<style scoped>
._input {
  width: 95%;
  height: 80px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
}
._input_icon {
  width: 130px;
  height: 100%;
  text-align: center;
  line-height: 100px;
}
._input_main{
    width: 80%;
    height: 100%;
    border-bottom: 1px solid grey;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
input{
    width: 70%;
    height: 90%;
    border: none;
    font-size: 28px;
    text-align: center;
    background-color: #fafafa;
}
._input_text_button{
    width: 30%;
    height: 90%;
    /* background-color: aqua; */
    font-size: 26px;text-align: center;
    /* line-height: 60px; */

}
</style>
